<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>3D 霓虹旋转卡片</title>
    <style>
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        /* 背景：深色渐变 + 网格纹理 */
        body {
            min-height: 100vh;
            display: flex;
            justify-content: center;
            align-items: center;
            background: linear-gradient(135deg, #0f1123, #1a1e4d);
            background-image: radial-gradient(#3a3f7a 1px, transparent 1px);
            background-size: 20px 20px;
            perspective: 1000px; /* 开启 3D 透视 */
        }

        /* 卡片容器：控制 3D 旋转 */
        .card-container {
            position: relative;
            width: 320px;
            height: 450px;
            transform-style: preserve-3d; /* 子元素保持 3D 效果 */
            animation: rotate 15s linear infinite; /* 自动旋转动画 */
        }

        /* 卡片主体：霓虹边框 + 渐变背景 */
        .card {
            position: absolute;
            width: 100%;
            height: 100%;
            background: linear-gradient(145deg, rgba(255,255,255,0.05), rgba(255,255,255,0.01));
            border: 1px solid rgba(120, 255, 255, 0.3);
            border-radius: 16px;
            backdrop-filter: blur(8px); /* 毛玻璃效果 */
            box-shadow: 0 0 20px rgba(76, 201, 240, 0.2), 
                        inset 0 0 10px rgba(76, 201, 240, 0.1);
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            padding: 24px;
            transform: translateZ(20px); /* 卡片沿 Z 轴偏移，增强 3D 感 */
        }

        /* 霓虹边框动画：颜色循环变化 */
        .card::before {
            content: "";
            position: absolute;
            top: -2px;
            left: -2px;
            right: -2px;
            bottom: -2px;
            border-radius: 18px;
            background: linear-gradient(45deg, #4cc9f0, #4361ee, #7209b7, #f72585, #4cc9f0);
            background-size: 500%;
            z-index: -1;
            animation: neonGlow 8s linear infinite;
        }

        /* 卡片内容：文字 + 图标 */
        .card-icon {
            width: 80px;
            height: 80px;
            margin-bottom: 20px;
            background: linear-gradient(45deg, #4cc9f0, #7209b7);
            border-radius: 50%;
            display: flex;
            justify-content: center;
            align-items: center;
            box-shadow: 0 0 15px rgba(76, 201, 240, 0.5);
        }

        .card-icon svg {
            width: 40px;
            height: 40px;
            fill: white;
        }

        .card-title {
            font-size: 24px;
            font-weight: 600;
            color: white;
            margin-bottom: 12px;
            text-shadow: 0 0 8px rgba(76, 201, 240, 0.6);
        }

        .card-desc {
            font-size: 14px;
            color: rgba(255, 255, 255, 0.7);
            text-align: center;
            line-height: 1.6;
        }

        /* 3D 旋转动画 */
        @keyframes rotate {
            0% {
                transform: rotateY(0deg) rotateX(10deg);
            }
            100% {
                transform: rotateY(360deg) rotateX(10deg);
            }
        }

        /* 霓虹边框发光动画 */
        @keyframes neonGlow {
            0% {
                background-position: 0 0;
            }
            50% {
                background-position: 500% 0;
            }
            100% {
                background-position: 0 0;
            }
        }

        /* 鼠标悬浮交互：增强光影 + 暂停旋转 */
        .card-container:hover {
            animation-play-state: paused; /* 鼠标悬浮时暂停旋转 */
        }

        .card-container:hover .card {
            box-shadow: 0 0 30px rgba(76, 201, 240, 0.4), 
                        inset 0 0 15px rgba(76, 201, 240, 0.2);
        }
    </style>
</head>
<body>
    <div class="card-container">
        <div class="card">
            <div class="card-icon">
                <!-- 霓虹图标（使用 SVG 确保清晰度） -->
                <svg viewBox="0 0 24 24">
                    <path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 17h-2v-2h2v2zm2.07-7.75l-.9.92C13.45 12.9 13 13.5 13 15h-2v-.5c0-1.1.45-2.1 1.17-2.83l1.24-1.26c.37-.36.59-.86.59-1.41 0-1.1-.9-2-2-2s-2 .9-2 2H8c0-2.21 1.79-4 4-4s4 1.79 4 4c0 .88-.36 1.68-.93 2.25z"/>
                </svg>
            </div>
            <h2 class="card-title">3D 霓虹卡片</h2>
            <p class="card-desc">
                基于 HTML + CSS 实现的炫酷效果<br>
                包含 3D 旋转、霓虹发光、毛玻璃质感<br>
                鼠标悬浮可暂停旋转
            </p>
        </div>
    </div>
</body>
</html>